<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>

<style>
.error {
	color: #ff0000;
	font-weight: bold;
}

table {
	width: 750px;
	border-collapse: collapse;
	text-align: center;
	font-family: 'Trebuchet MS';
}

td,th {
	font-size: 9pt;
	border: 1px solid #ffffff;
	height: 30px;
}

th {
	background-color: #5075dd;
	color: #ffffff;
	font-family: Georgia;
}

tr.alt td {
	color: #000000;
	background-color: #EAF2D3;
}

.bt_view {
	background-color: #8099de;
	border: 1px solid #999;
	width: 80px;
	height: 18px;
	border-radius: 8px;
	border: none;
	margin: 0 0 0 5px;
	font-weight: bold;
	font-size: 0.9em;
	color: #FFF;
	background-image: url(../images/member/dup.jpg);
	background-repeat: repeat-x;
	background-position: center center;
}
</style>

<h1 align="center">Certification List</h1>
<br>
<sec:authorize ifAllGranted="ROLE_EMPLOYEE">
	<form method="POST" action="<c:url value="/certification/addCf"/>">
		<input type="text" name="certificationName" size="28" /> <input
			type="submit" value="추가" class="bt_view" />
		<p>
	</form>
</sec:authorize>
<table border="1">
	<tr>
		<th>자격증번호</th>
		<th>자격증이름</th>
		<sec:authorize ifAllGranted="ROLE_EMPLOYEE">
			<th></th>
		</sec:authorize>
	</tr>
	<c:forEach items="${cfList }" var="certification">
		<tr>
			<td>${certification.certificationId }</td>
			<td>${certification.certificationName }</td>
			<sec:authorize ifAllGranted="ROLE_EMPLOYEE">
				<td>
					<form method="post"
						action="<c:url value="/certification/removeCf"/>">
						<input name="certiSeq" type="hidden"
							value="${certification.certificationId }" /> <input
							type="submit" value="삭제" class="bt_view" />
					</form>
				</td>
			</sec:authorize>

			<!-- <td><a href="remove?memberName=${guest.name }">remove</a></td> -->
		</tr>
	</c:forEach>
</table>
